import java.util.Scanner;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2023/3/30 11:44
 * 小易的升级之路
 * 找出字符串中第一个只出现一次的字符
 */
public class Day22 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        solution1(s);
//        while (scanner.hasNext()){
//            int count = scanner.nextInt();
//            int ability = scanner.nextInt();
//            int[] b = new int[count];
//            for (int i = 0; i < b.length; i++) {
//                b[i] = scanner.nextInt();
//            }
//            System.out.println(solution(ability, b));
//        }
    }


    //-----------------------------------------------
    private static String solution1(String s) {
        String res = "-1";
        char[] ch = s.toCharArray();
        for (char c : ch) {
            if (s.indexOf(c) == s.lastIndexOf(c)) {
                res = c + "";
                return res;
            }
        }
        return res;
    }
    //-----------------------------------------------
    private static int solution(int ability, int[] b) {
        for (int i = 0; i < b.length; i++) {
            if (ability>=b[i]){
                ability+=b[i];
            }else {
                ability += pubNum(ability,b[i]);
            }
        }
        return ability;
    }

    private static int pubNum(int little, int big) {
        int tem = 0;
        while (little>0){
            tem = big%little;
            big = little;
            little = tem;
        }
        return big;
    }

}
